app.service('requestdata', ['$http', function($http) {
    var _this = this;
    _this.baseUrl = "http://localhost:3000/api/";

    // get请求数据
    _this.get_request_data = function(data, url) {
        return $http({
            method: "get",
            url: _this.baseUrl + url,
            params: data
        });
    }

    // post请求数据
    _this.post_request_data = function(data, url) {
        return $http({
            method: "post",
            url: _this.baseUrl + url,
            data: data
        });
    }
}]);